#include"list.h"

void test1(ListNode* phead)
{
	ListPushBack(phead, 1);
	ListPushBack(phead, 2);
	ListPushBack(phead, 3);
	ListPushBack(phead, 4);
	ListPushBack(phead, 5);
	ListPrint(phead);
	printf("\n");
	ListPopBack(phead);
	ListPrint(phead);
	printf("\n");
	ListPushFront(phead, 6);
	ListPushFront(phead, 7);
	ListPushFront(phead, 8);
	ListPushFront(phead, 9);
	ListPrint(phead);
	printf("\n");
	ListPopFront(phead);
	ListPrint(phead);
	printf("\n");
	ListNode* pos1 = ListFind(phead, 5);
	ListNode* pos2 = ListFind(phead, 6);
	printf("%p\n", pos1);
	printf("%p\n", pos2);
	ListInsert(pos2, 10);
	ListInsert(pos2, 11);
	ListPrint(phead);
	printf("\n");
	ListErase(pos2);
	ListPrint(phead);
	printf("\n");
}

int main()
{
	ListNode* phead = ListCreate(-1);
	test1(phead);
	ListDestory(phead);
	return 0;
}